

        <g:set var="entityName" value="${message(code: 'studentEvaluate.label', default: 'StudentEvaluate')}" />
            <div class="list">
                <table>
                    <thead>
                        <tr>
                        
                            <g:sortableColumn property="attendance" title="${message(code: 'studentEvaluate.attendance.label', default: 'Attendance')}" />
                        
                            <g:sortableColumn property="expression" title="${message(code: 'studentEvaluate.expression.label', default: 'Expression')}" />
                        
                            <g:sortableColumn property="homework" title="${message(code: 'studentEvaluate.homework.label', default: 'Homework')}" />
                        
                            <g:sortableColumn property="complex" title="${message(code: 'studentEvaluate.complex.label', default: 'Complex')}" />
                        
                  	    
                            <th><g:message code="studentEvaluate.postTeacher.label" default="Post Teacher" /></th>

                            <th>评价时间</th>

                            <th></th>

                            <th></th>
                   	    
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${studentEvaluateInstanceList}" status="i" var="studentEvaluateInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                        
                            <%
                                def attendance = studentEvaluateInstance.attendance.size() > 8?studentEvaluateInstance.attendance.substring(0,8)+"...":studentEvaluateInstance.attendance

                                def expression = studentEvaluateInstance.expression.size() > 8?studentEvaluateInstance.expression.substring(0,8)+"...":studentEvaluateInstance.expression

                                def homework = studentEvaluateInstance.homework.size() > 8?studentEvaluateInstance.homework.substring(0,8)+"...":studentEvaluateInstance.homework

                                def complex = studentEvaluateInstance.complex.size() > 8?studentEvaluateInstance.complex.substring(0,8)+"...":studentEvaluateInstance.complex
                            %>
                            <td>${attendance}</td>
                        
                            <td>${expression}</td>
                        
                            <td>${homework}</td>
                        
                            <td>${complex}</td>
                        
                            <td>${studentEvaluateInstance.postTeacher.name}</td>

                            <td><g:formatDate date="${studentEvaluateInstance.createTime}" /></td>

                            <td>
                            
                            <g:if test="${params.evaluateFlag}">
                            <g:link action="show" id="${studentEvaluateInstance.id}"  params="[evaluateFlag:true]">查看评价</g:link>
                            </g:if>
                            <g:else>
                            <g:link action="show" id="${studentEvaluateInstance.id}">查看评价</g:link>
                            </g:else>
                            </td>

                            <td class="operate">
                                <g:if test="${loggedInUserInfo(field:'id').toString() == studentEvaluateInstance.postTeacher.id.toString()}">
                                    <x:operate width="100">                                
                                        <g:if test="${params.evaluateFlag}">
                                            <g:link controller="studentEvaluate" action="edit" id="${studentEvaluateInstance.id}" params="[evaluateFlag:true]">
                                                <g:message code="default.button.edit.label" />
                                            </g:link>
                                            <g:link controller="studentEvaluate" action="delete" id="${studentEvaluateInstance.id}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" params="[studentID:studentEvaluateInstance.student.id,evaluateFlag:true]">
                                                <g:message code="default.button.delete.label" />
                                            </g:link>
                                        </g:if>
                                        <g:else>
                                            <g:link controller="studentEvaluate" action="edit" id="${studentEvaluateInstance.id}">
                                                <g:message code="default.button.edit.label" />
                                            </g:link>
                                            <g:link controller="studentEvaluate" action="delete" id="${studentEvaluateInstance.id}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" params="[studentID:studentEvaluateInstance.student.id]">
                                                <g:message code="default.button.delete.label" />
                                            </g:link>
                                        </g:else>
                                    </x:operate>
                                </g:if> 
                            </td>
                        
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            <div class="paginateButtons">
                <g:paginate total="${studentEvaluateInstanceTotal}" />
            </div>
